package com.turnengine.client.local.upkeep.calculator;

import static com.javabi.common.lang.Variables.notNull;

import com.turnengine.client.local.faction.IFactionCache;
import com.turnengine.client.local.group.IGroupCache;
import com.turnengine.client.local.unit.IUnitCache;
import com.turnengine.client.local.unit.list.IUnitListSet;
import com.turnengine.client.local.unit.storage.IStorageCache;
import com.turnengine.client.local.upkeep.IUpkeepCache;

public class UpkeepCalculator implements IUpkeepCalculator {

	private final IFactionCache factionCache;
	private final IGroupCache groupCache;
	private final IUnitCache unitCache;
	private final IUpkeepCache upkeepCache;
	private final IStorageCache storageCache;

	public UpkeepCalculator(IFactionCache faction, IGroupCache group, IUnitCache unit, IStorageCache storage, IUpkeepCache upkeep) {
		this.factionCache = notNull("faction", faction);
		this.groupCache = notNull("group", group);
		this.unitCache = notNull("unit", unit);
		this.storageCache = notNull("storage", storage);
		this.upkeepCache = notNull("upkeep", upkeep);
	}

	@Override
	public IUnitCache getUnitCache() {
		return unitCache;
	}

	@Override
	public IGroupCache getGroupCache() {
		return groupCache;
	}

	@Override
	public IFactionCache getFactionCache() {
		return factionCache;
	}

	@Override
	public IUpkeepCache getUpkeepCache() {
		return upkeepCache;
	}

	@Override
	public IStorageCache getStorageCache() {
		return storageCache;
	}

	@Override
	public void applyUpkeep(IUnitListSet unitList) {
		throw new UnsupportedOperationException();
	}

}
